home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap15 / dun15_2.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  1.3 KB  |  35 lines

  1. <DIV ID=banner STYLE="position: absolute; left: 32; top: 9;">
  2.  
  3.   <IMG NAME=arrow SRC="arrow.gif" ALIGN=left>
  4.  
  5.   <FONT FACE="Arial, Helvetica" SIZE=+2>
  6.  
  7.     Exposing Page Elements in Communicator 4.0
  8.  
  9.   </FONT>
  10.  
  11. </DIV>
  12.  
  13.  
  14.  
  15. <BR><BR>
  16.  
  17. <P>The <TT>DIV</TT> element is reflected as both
  18.  
  19. <TT>document.layers['banner']</TT> and <TT>document.banner</TT> in
  20.  
  21. Communicator 4.0.</P>
  22.  
  23.  
  24.  
  25. <P>The <TT>IMG</TT> element, when contained within the <TT>DIV</TT>
  26.  
  27. element is reflected as <TT>document.banner.document.images['arrow']</TT>
  28.  
  29. and <TT>document.banner.document.arrow</TT>.  It can also be accessed
  30.  
  31. using the <TT>document.layers['banner']</TT> notation for the
  32.  
  33. <TT>DIV</TT> parent layer.  Its reflected attributes include:</P>
  34.  
  35.  
  36.  
  37. <BLOCKQUOTE>
  38.  
  39. <SCRIPT>
  40.  
  41.    document.writeln("<B>name:</B> ");
  42.  
  43.    document.writeln(document.banner.document.images['arrow'].name);
  44.  
  45.    document.writeln("<BR>");
  46.  
  47.    document.writeln("<B>src:</B> ");
  48.  
  49.    document.writeln(document.layers['banner'].document.images['arrow'].src);
  50.  
  51.    document.writeln("<BR>");
  52.  
  53.    document.writeln("<B>width:</B> ");
  54.  
  55.    document.writeln(document.banner.document.arrow.width);
  56.  
  57.    document.writeln("<BR>");
  58.  
  59.    document.writeln("<B>height:</B> ");
  60.  
  61.    document.writeln(document.layers['banner'].document.arrow.height);
  62.  
  63.    document.writeln("<BR>");
  64.  
  65. </SCRIPT>
  66.  
  67. </BLOCKQUOTE>
  68.  
  69.